Keir Fraser [Wed, 5 Dec 2007 10:40:19 +0000 (10:40 +0000)]
xm: Fix help message of xm info.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Wed, 5 Dec 2007 10:34:15 +0000 (10:34 +0000)]
x86_emulate: EFLAGS.PF only reflects least-significant byte of result,
so even_parity() can return to its original prototype.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 5 Dec 2007 10:00:42 +0000 (10:00 +0000)]
[USER GUIDE] [ACM/sHype Update] User Guide Update for sHype/Xen
This patch updates the ACM/sHype user guide chapter. It updates the
examples throughout the chapter and describes advanced security policy
and domain management based on the new ACM xm command extensions that
were submitted this morning (cf.
http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00043.html
and
http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00041.html).
Signed-off: Reiner Sailer <sailer@us.ibm.com>
Keir Fraser [Wed, 5 Dec 2007 09:59:23 +0000 (09:59 +0000)]
blktap: cleanups for *BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 5 Dec 2007 09:57:32 +0000 (09:57 +0000)]
Fix help message of on_xend_stop
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Wed, 5 Dec 2007 09:56:17 +0000 (09:56 +0000)]
x86: Sync cpu/common.c with Linux 2.6.18.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 5 Dec 2007 09:46:55 +0000 (09:46 +0000)]
x86 domain builder: Propagate x86_compat return code.
Signed-off-by: Elizabeth Kon <eak@us.ibm.com>
Keir Fraser [Wed, 5 Dec 2007 09:45:13 +0000 (09:45 +0000)]
Implement legacy XML-RPC interface for ACM commands.
This patch moves the directory of files where xend is writing policies
and resource labels into to /var/lib/xend/security/policies.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Wed, 5 Dec 2007 09:44:20 +0000 (09:44 +0000)]
Implement legacy XML-RPC interface for ACM commands.
This patch implements a (non Xen-API) legacy XML-RPC interface for the
ACM commands and funnels the calls into code introduced by the Xen-API
support for ACM security management. Since some of the functionality
has changed, also the xm applications have changed. In particular the
following old commands have been removed along with some tools the
have become obsolete now:
- loadpolicy (included in: setpolicy)
- makepolicy (included in: setpolicy)
- cfgbootpolicy (included in: setpolicy)
and the following commands been introduced:
- setpolicy
- getpolicy
- resetpolicy
All tools have been adapted to work in Xen-API and legacy XML-RPC
mode. Both modes support the same functionality.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Tue, 4 Dec 2007 22:54:58 +0000 (22:54 +0000)]
Keir Fraser [Tue, 4 Dec 2007 11:52:10 +0000 (11:52 +0000)]
Fix xenctl_cpumap_to_cpumask.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 4 Dec 2007 11:23:05 +0000 (11:23 +0000)]
x86_emulate: Fix SHLD/SHRD emulation -- cannot rely on dst.orig_val
being already initialised.
From: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 4 Dec 2007 11:16:41 +0000 (11:16 +0000)]
docs: Fix interface manual to correctly reference
update_va_mapping_otherdomain.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 4 Dec 2007 11:06:05 +0000 (11:06 +0000)]
Merge with ia64.
Keir Fraser [Tue, 4 Dec 2007 11:04:57 +0000 (11:04 +0000)]
x86: clean up mm.c and cache 'current' where appropriate.
Attached patch caches current vcpu and current->domain where
appropriate. Make mod_l4_entry() definition matching with
mod_l?_entry(). Since current->domain was always passed to it, this
has no functional change.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 4 Dec 2007 10:50:28 +0000 (10:50 +0000)]
blkif interface: Add BLKIF_OP_FLUSH_DISKCACHE.
This disk operation, implemented on Solaris only so far, asks a
backend to flush the disk caches of the underlying storage if
possible, and is contigent upon the 'feature-flush-cache' xenstore
flag (although currently Solaris will always attempt to flush
anyway).
Signed-off-by: John Levon <john.levon@sun.com>
Keir Fraser [Tue, 4 Dec 2007 10:48:28 +0000 (10:48 +0000)]
blktap: remove unused headers.
Attached patch removes unused linux specific headers
and makes bswap.h ready for BSD support.
This is first step for BSD support in blktap. More to come.
No functional change.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 4 Dec 2007 10:47:10 +0000 (10:47 +0000)]
tboot, xen: Update for Trusted Boot v20071128.
This patch updates the Xen to work with the latest version (
20071128)
of Trusted Boot (tboot). This version of tboot now resides at 16MB
(instead of the previous <1MB), in addition to several other
enhancements. By residing at 16MB, this version of tboot will be
protected from access by dom0.
This patch allows Xen to correctly map the tboot shutdown code that it
must trampoline into for a clean shutdown (without this patch Xen will
fault on shutdown). This patch will also work with the previous
version of tboot.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Keir Fraser [Tue, 4 Dec 2007 10:41:55 +0000 (10:41 +0000)]
xend: Implement get_by_name_label for class XendNetwork
Although XenAPI c-bindings support this operation on Network class,
there is no implementation in xend. This patch provides one.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Tue, 4 Dec 2007 10:40:48 +0000 (10:40 +0000)]
Fix xenmon.py to work on Solaris
The xenmon.py script does not work on Solaris because of (1) its
assumption that xenbaked is in the users path and, (2) the use of the
killall command. Changed xenmon.py to use pkill instead and provided
the path to xenbaked on Solaris.
Signed-off-by: Tariq Magdon-Ismail <tariqmi@sun.com>
Keir Fraser [Tue, 4 Dec 2007 10:29:00 +0000 (10:29 +0000)]
vt-d: Print messages when:
- vt-d has been enabled by xen
- user attempts assign a PCI device that has already been assigned to another hvm guest
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Keir Fraser [Tue, 4 Dec 2007 10:25:35 +0000 (10:25 +0000)]
xsm: Consolidate xsm processing within domain control hypercall.
Consolidate all the 15 xsm calls from within do_domctl a single
routine that is only called in one place, xsm_domctl:
int xsm_domctl (struct xen_domctl *domctl);
The parameter to domctl is a pointer to the xen_domctl structure that
contains a union of all sub operational parameters.
The benefits of this patch include:
(1) Easier to maintain because there is one place in the entire
hypercall to check with the xsm, instead of 15 or more.
(2) New sub-operations don't also need to add a corresponding xsm
function.
(3) Removes 178 lines of code.
(4) Enhanced security because of 1-4.
Signed-off-by: Mike D. Day <ncmike@us.ibm.com>
Keir Fraser [Tue, 4 Dec 2007 10:17:32 +0000 (10:17 +0000)]
xentrace: Don't append trace on existing file.
When you run "xentrace -e <mask> trace.output" the first time, all is
fine. When you run it a second time, then the data is appended which
makes you reading old data with xentrace_format and you interprete it
as new data. This usually happens when you automated tracing guests
with xentrace and xentrace_format with a script.
Therefore, attached patch makes xentrace to truncate the file to zero
bytes before writing any data.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 4 Dec 2007 10:13:04 +0000 (10:13 +0000)]
domain builder: make mmap() failure message more verbose.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 4 Dec 2007 10:11:54 +0000 (10:11 +0000)]
mini-os: No -fpic when building for x86.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Tue, 4 Dec 2007 10:10:23 +0000 (10:10 +0000)]
vnet: Fix compilation on x86/64 which erroneously asserts
__ARCH_WANT_SYS_SOCKETCALL.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 4 Dec 2007 10:04:00 +0000 (10:04 +0000)]
vnet: Fix compilation.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Tue, 4 Dec 2007 09:56:10 +0000 (09:56 +0000)]
x86: Move get_page/put_page out of header file, and only print on
get_page() failure if the domain is not dying.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Alex Williamson [Fri, 30 Nov 2007 15:54:33 +0000 (08:54 -0700)]
merge with xen-unstable.hg
Keir Fraser [Thu, 29 Nov 2007 19:30:33 +0000 (19:30 +0000)]
x86_emulate: Fix POPA. Few other cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Alex Williamson [Thu, 29 Nov 2007 19:15:43 +0000 (12:15 -0700)]
[IA64] Implement guest_os_type for ia64
This makes use of the domain config option guest_os_type for
ia64 and removes the backing for the previous ACPI based
mechanism used previously. A user wanting optimal performance
for a specific type of OS guest running in an HVM domain should
make use of this new option. See updated xmexmaple.vti for
available options. All supported OSes should always work using
the default option or leaving the option unspecified. Originally
based on patch from Zhang Xin.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Thu, 29 Nov 2007 19:01:44 +0000 (12:01 -0700)]
[IA64] Provide backing for XEN_DOMCTL_set_opt_feature
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Thu, 29 Nov 2007 18:57:23 +0000 (11:57 -0700)]
[IA64] Create XEN_DOMCTL_set_opt_feature
Intended for domain builder code to be able to set architecture
specific optimization features for a domain.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Keir Fraser <keir.fraser@citrix.com>
Alex Williamson [Thu, 29 Nov 2007 18:54:31 +0000 (11:54 -0700)]
[IA64] Create common guest_os_type domain config option
This is an optional domain config entry that may be used by
architecture specific builder code to setup various optimizations
based on the guest OS intended to run in the domain. Based on
patch from Zhang Xin.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 22:36:33 +0000 (22:36 +0000)]
vmx: Better tracing in vmcs_dump_vcpu() -- grab RIP/RSP/RFLAGS from
cpu_user_regs structure as well as VMCS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 22:09:19 +0000 (22:09 +0000)]
x86_emulate: Emulate SHLD and SHRD instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Alex Williamson [Wed, 28 Nov 2007 19:38:58 +0000 (12:38 -0700)]
[IA64] Fix assign_domain_mmio_page
Test phys_addr against efi memmap, not mpaddr.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Alex Williamson [Wed, 28 Nov 2007 19:34:33 +0000 (12:34 -0700)]
[IA64] Only use streamlined entry/exit for xen hypercall.
This patch allows to use ia64 specific hypercalls in vti mode.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Wed, 28 Nov 2007 19:32:28 +0000 (12:32 -0700)]
[IA64] vcpu_setcontext: only set cr_irr if VGCF_SET_CR_IRR flag is set.
cr_irr can be modified even when a vcpu is blocked (by itv handler).
Unconditionally setting cr_irr can trouble debugger as it may clear a bit
of cr_irr and thus miss an interrupt. This can be very annoying if the
interrupt is itv and the vcpu is inside PAL_HALT_LIGHT (the vcpu stays
blocked forever).
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Keir Fraser [Wed, 28 Nov 2007 13:36:56 +0000 (13:36 +0000)]
domctl: Fix handling of size parameter in ext_vcpucontext domctl commands.
Original patch by Stefan Berger.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 13:28:49 +0000 (13:28 +0000)]
xsm: Fix linker script integration for xsm initcall list.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 13:13:51 +0000 (13:13 +0000)]
hvm: Fix 2 type mismatches in vlapic.h and hpet.c for 32-bit build Xen
For 32-bit build of Xen:
1) the first mismatch (in hpet_read(), length is 4) makes guest think
the HPET DM is buggy (we return 0 for HPET_CFG.COUNTER_CLK_PERIOD to
guest), so guest wouldn't use HPET at all.
2) the second one: if tmict is
62500000 and timer_divisor is 16
(Fedoar7's installer uses the values at some time), 10 *
62500000 * 16
= 0x2540BE400 -- it's too big to be held in uint32_t.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>=20
Keir Fraser [Wed, 28 Nov 2007 13:04:47 +0000 (13:04 +0000)]
hvm: Inject #UD for un-emulated instructions rather than crash guest
The CrashMe stress test (a process repeatedly forks child processes, and
the child processes initialize a buffer with random numbers, then treat
the buffer as code, and execute it) can crash 32-bit HVM RHEL5.1 guest
easily; this is because we haven't emulated all the instructions in
handle_mmio() yet.
The CrashMe process runs with root rights, and can access MMIO space in
an unknown way ("strace -f" shows the random codes running at CPL=3D3
don't call mmap(), and don't open any special files in /dev/ "); the gpa
may look like 0xa**** or 0xb****, or 0xfee0****. =20
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 12:50:24 +0000 (12:50 +0000)]
Fix string length check for vsnprintf() in debugtrace_printk().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 28 Nov 2007 12:44:46 +0000 (12:44 +0000)]
x86_emulate: Emulate RDTSC instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 12:44:19 +0000 (12:44 +0000)]
x86_emulate: Emulate ENTER and LEAVE instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 12:42:17 +0000 (12:42 +0000)]
[Mini-OS] Catch NULL dereferences
Unmap page 0 (only used early at boot) so as to catch NULL dereferences.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 12:41:41 +0000 (12:41 +0000)]
[Mini-OS] Fix strrchr() when string doesn't contain the character.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 12:40:57 +0000 (12:40 +0000)]
[Mini-OS] Make gnttab allocation/free safe
Add a semaphore to protect gnttab_list from exhaustion, and disable
callbacks during allocation/free. Fix the network frontend accordingly.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Wed, 28 Nov 2007 12:34:11 +0000 (12:34 +0000)]
vt-d: Some fixes and cleanup of Intel iommu
This patch modifies domain id in __iommu_flush_context() and
__iommu_flush_iotlb() to be consistent consist with domain id set by
context_set_domain_id(), avoids setting NULL to address space root
and corrects macro cap_ndoms.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Tue, 27 Nov 2007 12:49:16 +0000 (12:49 +0000)]
minios: Revert 16206:
7b5b65fbaf61 (xenbus wait fixup)
Already fixed by 14432:
f40079acf646.
Keir Fraser [Tue, 27 Nov 2007 12:45:08 +0000 (12:45 +0000)]
x86_emulate: Fix use-before-initialise warning.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 22:28:48 +0000 (22:28 +0000)]
vmx realmode: Slight finessing of an error path.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 22:20:21 +0000 (22:20 +0000)]
vmx realmode: When returning to protected mode we have to massage the
segment state to pass VMENTER's stringent 'sanity checks'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 17:55:23 +0000 (17:55 +0000)]
vmx realmode: Emulate writes to control registers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 17:54:54 +0000 (17:54 +0000)]
x86_emulate: Emulate LMSW and SMSW.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Alex Williamson [Mon, 26 Nov 2007 17:07:30 +0000 (10:07 -0700)]
[IA64] Add physical to physical data only and reverse transitions.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 26 Nov 2007 17:03:53 +0000 (10:03 -0700)]
[IA64] Extract debug_op.h from arch-ia64.h
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Keir Fraser [Mon, 26 Nov 2007 16:57:57 +0000 (16:57 +0000)]
x86 emulate: Emulate atomic read-modify-write instructions as a
straightforward write. Hopefully multiprocessor synchronisation is not
relied upon in real mode!
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 16:47:10 +0000 (16:47 +0000)]
vmx realmode: Fix emulation of exception delivery (stack pointer must
be adjusted for FLAGS push), and fix up vmx_realmode() exit protocol
now that it is called from asm stub context.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 16:46:22 +0000 (16:46 +0000)]
x86_emulate: Emulate RETF and RETF imm16.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 15:32:54 +0000 (15:32 +0000)]
x86_emulate: Emulate CPUID and HLT.
vmx realmode: Fix decode & emulate loop, add hooks for CPUID, HLT and
WBINVD. Also do not hook realmode entry off of vmentry failure any
more.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 26 Nov 2007 13:54:45 +0000 (13:54 +0000)]
x86_emulate: Emulate LDS/LES/LFS/LGS/LSS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 21:24:48 +0000 (21:24 +0000)]
vmx realmode: Detect and correctly plumb mmio accesses from emulated
realmode. Also correctly handle debug output to I/O port 0xe9.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 18:07:33 +0000 (18:07 +0000)]
x86_emulate: Emulate CMPS and SCAS string-compare instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 18:06:30 +0000 (18:06 +0000)]
x86_emulate: Emulate IRET.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 18:05:56 +0000 (18:05 +0000)]
x86_emulate: Decode and emulate PUSHF/POPF.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 18:05:10 +0000 (18:05 +0000)]
x86_emulate: Allow emulated injection of exceptions and interrupts.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 12:43:13 +0000 (12:43 +0000)]
x86_emulate: Emulate far call/jmp. This completes emulation of Grp5.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 11:45:02 +0000 (11:45 +0000)]
vmx realmode: Support privileged EFLAGS updates in emulated realmode.
Also tweak debug tracing to be much less noisy. We can emulates tens
of thousands of instructions in rombios now.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 11:43:53 +0000 (11:43 +0000)]
vmx realmode: Plumb through I/O port accesses in emulated realmode.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 25 Nov 2007 09:23:02 +0000 (09:23 +0000)]
vt-d: Fix iommu_map_page().
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Sat, 24 Nov 2007 22:33:38 +0000 (22:33 +0000)]
Remove unused bcopy() implementation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 22:19:03 +0000 (22:19 +0000)]
Revert 16450:
5e8e82e80. Instead remove all arch-specific handling of
memcmp() and hence always use common/lib.c version.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 21:46:14 +0000 (21:46 +0000)]
vmx: Initial framework for real-mode emulation (disabled by default).
Still plenty to do:
- i/o emulation
- more instructions
- interrupt/exception delivery
- vm86 fast path
At this stage we can get three instructions into the rombios.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 21:40:19 +0000 (21:40 +0000)]
x86_emulate: Support most common segment load/save instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 16:16:57 +0000 (16:16 +0000)]
x86: Fix read/write control-register in x86_emulate().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:40:23 +0000 (13:40 +0000)]
vt-d: Some fixes of Intel iommu
This patch removes a wrong if condition judgement to setup rmrr
identify mapping for guests, and passes page count rather than address
size to iommu_flush_iotlb_psi().
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Anthony Xu <Anthony.xu@intel.com>
Keir Fraser [Sat, 24 Nov 2007 13:39:13 +0000 (13:39 +0000)]
[ACM] Remove aggregate set calculations for Domain-0
Since the pre_domain_create hook is called also for Dom-0, this
special case handling is not necessary any more.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Sat, 24 Nov 2007 13:37:26 +0000 (13:37 +0000)]
Fix non-optimized compilation of Xen's memcmp
Even when using __builtin_memcmp, gcc may emit external references to
memcmp (when not optimizing for instance), so this #define does not
always provide a completely suitable memcmp().
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:31:39 +0000 (13:31 +0000)]
[Mini-OS] Fix domain blocking race
A callback which wakes a thread may happen between the moment
schedule() gives hand to the idle thread and the latter blocks the
domain. Idle hence needs to atomically check that no thread is
running and block, else awoken threads may have to wait up to 10
seconds.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:31:01 +0000 (13:31 +0000)]
[Mini-OS] Permit x86_64 trap handlers to return
Trap handlers sometimes fix the problem, so they need to be able to
return.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:29:20 +0000 (13:29 +0000)]
[Mini-OS] Make sure schedule() is called safely
If a thread tries to sleep from a callback or with callbacks disabled,
Mini-OS will completely lock, so make sure this never happens.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:28:54 +0000 (13:28 +0000)]
[Mini-OS] Fix netfront xmit overflow
Fix xmit overflow by making netfront_xmit sleep until
network_tx_buf_gc() frees an xmit request.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:28:27 +0000 (13:28 +0000)]
[Mini-OS] Fix net backend path leak
Free backend path after use.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:27:59 +0000 (13:27 +0000)]
[Mini-OS] Make wake_up callback-safe
As it may compete with event handlers waking wait queues, wake_up
needs to be callback-safe.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:27:32 +0000 (13:27 +0000)]
[Mini-OS] Fix init_waitqueue_entry
Fix initialization of thread_list in init_waitqueue_entry().
Signed-off-by: Samuel Thibault <samuel.thibault@xensource.com>
Keir Fraser [Sat, 24 Nov 2007 13:27:08 +0000 (13:27 +0000)]
[Mini-OS] Add init_SEMAPHORE
Add init_SEMAPHORE() to dynamically initialize semaphores.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:26:39 +0000 (13:26 +0000)]
[Mini-OS] Make semaphores callback-safe
One may want to use semaphores in event handlers to wake threads
waiting for a resource, so semaphores then need to be callback-safe.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Sat, 24 Nov 2007 13:23:22 +0000 (13:23 +0000)]
x86, hvm: Config option to allow vmxassist to be disabled.
hvmloader is modified to dynamically detect this, allowing possibility
of optional full vmxassist replacement in 3.2 stable branch in future.
Currently 'vmxassist=y' is not much use since no replacement is
implemented.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:42:44 +0000 (16:42 +0000)]
[Mini-OS] Add strrchr()
Add strrchr(), useful e.g. for grabbing the last part of a xenbus
path.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:42:23 +0000 (16:42 +0000)]
[Mini-OS] Add ENOTSUP
Add missing ENOTSUP by defining it to EOPNOTSUPP like in Linux.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:41:54 +0000 (16:41 +0000)]
[Mini-OS] Move _ctype into a module
Move the _ctype array into its own module, instead of having it
defined in a header.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:39:45 +0000 (16:39 +0000)]
vt-d: Fix ISA IRQ alias issue
When assign multiple devices to guest which uses PIC, ISA IRQ alias
may occur. This patch splits ISA IRQ and GSI eoi function. In ISA IRQ
eoi function, searches all assigned mirqs and does eoi for the
corresponding mirqs which match the eoi ISA IRQ. Therefore fix ISA IRQ
alias issue.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Fri, 23 Nov 2007 16:25:59 +0000 (16:25 +0000)]
[Mini-OS] Make bind_virq return the port
Make bind_virq() return the port bound to the irq, which is useful
e.g. for masking/unmasking it.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:23:28 +0000 (16:23 +0000)]
[Mini-OS] Fix x86 arch_switch_thread
Fix x86 arch_switch_thread by making it pure assembly.
There were missing general register clobbers for x86_64, and BP should
theorically be clobbered too, but gcc does not believe that, so the
only simple safe solution is to use pure assembly.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:23:03 +0000 (16:23 +0000)]
[Mini-OS] Optimize get_current()
Let gcc perform the computation with SP itself, leading to yet better
code.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:22:36 +0000 (16:22 +0000)]
[Mini-OS] Fix stack closures
So as to make backtracing tools happy, correctly close x86 stacks for
new threads as well as on callback in the x86_32 case since there is
no unwind marker.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 16:22:13 +0000 (16:22 +0000)]
[Mini-OS] Fix x86 initial stack alignment
This fixes the initial stack alignment for x86, which is required for
current to return a fine NULL instead of a random value or possibly
crash during initialization.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Keir Fraser [Fri, 23 Nov 2007 11:58:11 +0000 (11:58 +0000)]
xend: Add support for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>